refactor: remove import-only aggregator files#839
Open
SnO2WMaN wants to merge 2 commits into
Open
Conversation
Delete Lean modules that only re-export their submodules via
`public import` (Foundation/FirstOrder/Basic.lean,
Foundation/FirstOrder/Completeness.lean,
Foundation/FirstOrder/Bootstrapping/Syntax.lean,
Foundation/FirstOrder/SetTheory/Basic.lean,
Foundation/FirstOrder/Arithmetic/{HFS,Definability,Exponential,Basic}.lean)
and inline their import lists into the files that imported them.
Foundation.lean is regenerated via `lake exe mk_all --module`.
Run `lake shake --keep-public --fix` over the files touched by the previous commit to drop imports that turned out to be unused after inlining the deleted aggregator files' import lists. `--keep-public` avoids downgrading still-needed `public import`s to private ones, which would silently break downstream re-exports (e.g. `cl_prover` via Foundation.Meta.ClProver, and Finset's `Repr` instance). Co-Authored-By: Claude <noreply@anthropic.com>
Member
|
集約専用ファイルは定理・定義をパッケージ化するのに便利だから残した方がいいかもしれない. |
Member
Author
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
module宣言とpublic importだけで構成され,それ自体は何も定義していない集約専用ファイルを削除しました(例:Foundation/FirstOrder/SetTheory/Basic.lean).Foundation/FirstOrder/Basic.leanFoundation/FirstOrder/Completeness.leanFoundation/FirstOrder/Bootstrapping/Syntax.leanFoundation/FirstOrder/SetTheory/Basic.leanFoundation/FirstOrder/Arithmetic/HFS.leanFoundation/FirstOrder/Arithmetic/Definability.leanFoundation/FirstOrder/Arithmetic/Exponential.leanFoundation/FirstOrder/Arithmetic/Basic.leanimportしていた各ファイルは,集約ファイルが束ねていた個々のサブモジュールへの import 列に展開しました.lake exe mk_all --moduleでFoundation.leanを再生成しました.lake shake --keep-public --fixを今回変更したファイルに対して実行し,展開後に不要になった import を削除しました.--keep-publicにより,必要なpublic import(例:cl_proverタクティクを提供するFoundation.Meta.ClProver,FinsetのReprインスタンスを提供するMathlib.Data.Finset.Sort等)が誤って private import に格下げされ,下流の再エクスポートが壊れることを防いでいます.Test plan
lake buildが 1656/1656 ジョブ成功で通ることを確認(残存する警告は今回の変更と無関係な既存のもの)